<?php
    $id = $this->_data['account_id'];
    $selected_race_setting = array(
    'table_name' => 'doggy_race',
    'key_field' => 'id',
    'value_field' => 'race_name',
    'init_data' => array('key' => '', 'name' => '(Select race)')
    );
    $selected_region_setting = array(
    'table_name' => 'animus_sub_region',
    'key_field' => 'id',
    'value_field' => 'name',
    'init_data' => array('key' => '', 'name' => '(Select region)')
    //'where' =>array('parent >' => 0)
    );
?>
<!--END WRAPPER-BANNER-->
<div id="wrapper-contenu">
<div id="col1">
    <?php
        $login_style = 'style="height:224px;"';
        if($erreur){
            $login_style='style="height: 274px;"';
        }
        if($validate_erreur){
            $login_style='style="height: 294px;"';
        }
    ?>
    <div id="login" align="center" <?php echo $login_style?>>
        <img src="<?php echo base_url() . 'assets/css/' ?>images/bgrtop_login.png" class="bgrtop"/>
        <img src="<?php echo base_url() . 'assets/css/' ?>images/bgrbottom_login.png" class="bgrbottom"/>
        <div class="contenu" align="left">
            <div id="titre_login" >CONNEXION CLIENT</div>
            <?php echo form_open('home/login') ?>
            <table id="form_login">
                <tr>
                    <td>Identifiant</td><td><input type="text" name="account_name_login" class="input_login"/></td>
                </tr>
                <tr>
                    <td colspan="2"><?php echo form_error('account_name_login') ?></td>
                </tr>
                <tr>
                    <td>Mot de passe</td><td><input type="password" name="pass" class="input_login"/></td>
                </tr>
                <tr>
                    <td colspan="2"><?php echo form_error('pass') ?></td>
                </tr>
            </table>
            <input type="submit" value="ENVOYER" name="submit" id="submit" />
            <?php echo form_close(); ?>
            <p style="color: red;font-weight: bolder;"><?php if($erreur) echo $erreur;?></p>
            <div id="pass_oublier">
                <a href="<?php echo site_url('home/register')?>">Inscription</a> / 
                <a href="<?php echo site_url('home/forgot_pass');?>">Mot de passe oublié?</a>
            </div>
            <!--END pass_oublier-->
        </div>
        <!--END CONTENU-->
    </div>
    <!--END LOGIN-->
    <div id="horoscope">
        <div class="titre_home"> HOROSCOPE</div>
        <table width="100%">
            <?php foreach ($list_horoscope as $hc): ?>
                <?php
                    $image = './../assets/avatar/images/' . $hc['avatar'];
                    if (file_exists($image)) {
                        $image = root_url('doggy-flirt') . 'assets/avatar/images/' . $hc['avatar'];
                    } else {
                        $image = root_url('doggy-flirt') . './assets/noimage.gif';
                } ?>
                <tr>
                    <td rowspan="2" width="10%" valign="top"><a href="<?php echo site_url('horoscope/detail_horoscope' . '/' . $hc['id']) ?>" class="suite"><img border="0" src="<?php echo $image; ?>" width="80"/></a></td>
                    <td width="90%"><?php echo get_short_description($hc['description'], 10); ?></td>
                </tr>
                <tr>
                    <td align="right"><a href="<?php echo site_url('horoscope/detail_horoscope' . '/' . $hc['id']) ?>" class="suite">Lire la suite >> </a><td>
                </tr>
                <?php endforeach; ?>
            <tr>
                <td colspan="2"><a href="<?php echo site_url('horoscope/list_horoscope')?>"  class="suite" style="float: left">Liste de tous les horoscopes</a></td>
            </tr>
        </table>
    </div>
    <!--END horoscope-->

    <div id="box_promenade" class="box">
        <img src="<?php echo base_url() . 'assets/css/' ?>images/bgrtop_2.png" class="bgrtop"/>
        <img src="<?php echo base_url() . 'assets/css/' ?>images/bgrbottom_2.png" class="bgrbottom"/>
        <div class="contenu_box">
            <div class="titre_box" >PROMENADE PRES DE CHEZ VOUS</div>
            <div class="detail_box" >
                <table width="100%">
                    <?php foreach ($list_parkway as $park): ?>
                        <?php
                            $image = './assets/parkway/images/' . $park['image'];
                            if (file_exists($image)) {
                                $image = base_url().'assets/parkway/images/' . $park['image'];
                            } else {
                                $image = root_url('doggy-flirt') . './assets/noimage.gif';
                        } ?>
                        <tr>
                            <td width="40%" valign="top"><a href="<?php echo site_url('parkway/detail_parkway' . '/' . $park['id']) ?>" style="float:left;
                                color:#5d94c5;"><img border="0" src="<?php echo $image; ?>" width="80"/></a></td>
                            <td align="left"><a href="<?php echo site_url('parkway/detail_parkway' . '/' . $park['id']) ?>" style="float:left;
                                color:#5d94c5;"><?php echo $park['name']; ?></a><td>
                        </tr>
                        <?php endforeach; ?>
                    <tr>
                        <td colspan="2"><a href="<?php echo site_url('parkway/list_parkway') ?>" class="suite" style="float: left">Liste tous les parcs</a></td>
                    </tr>
                </table>
            </div>
        </div>
        <!--END CONTENU-->
    </div>
    <!--END BOX promenade-->
    <div id="box_membre" class="box">
        <img src="<?php echo base_url() . 'assets/css/' ?>images/bgrtop_3.png" class="bgrtop"/>
        <img src="<?php echo base_url() . 'assets/css/' ?>images/bgrbottom_3.png" class="bgrbottom"/>
        <div class="contenu_box">
            <div class="titre_box" >MEMBRES</div>
            <div class="detail_box" >
                <table width="100%">
                    <?php for ($index = 0; $index < count($list_member); $index++):?>
                        <?php
                            $image = './doggy_avatar/images/' . $list_member[$index]['avatar'];
                            if (file_exists($image) && $list_member[$index]['avatar']!=null) {
                                $image = base_url() . 'doggy_avatar/images/'. $list_member[$index]['avatar'];
                            } else {
                                $image = root_url('doggy-flirt') . './assets/noimage.gif';
                        } ?>
                        <?php if(($index)%2 == 0):?>
                            <tr>
                                <?php endif;?>
                            <td width="40%" valign="top">
                                <div align="center" style="width: 84px;height: 84px; background:#ffffff;background: transparent"> <a  href="<?php echo site_url('home/compte').'/'.$list_member[$index]['id']?>"><img align="middle" border="0" src="<?php echo $image; ?>" style="max-width: 80px;max-height: 80px" alt=""/></a></div>
                            <br/>
                            <a href="<?php echo site_url('home/compte').'/'.$list_member[$index]['id']?>"><span class="noun"><?php echo $list_member[$index]['account_name']?></span></a>
                            </td>
                            <?php if($index%2==1):?>
                            </tr>
                            <?php endif;?>
                        <?php endfor;?>
                    <tr>
                        <td colspan="2"><a href="<?php echo site_url('home/nouveaux_membres')?>"  class="suite" style="float: left">Liste tous les membres</a></td>
                    </tr>
                </table>
            </div>
        </div>
        <!--END CONTENU-->
    </div>
    <!--END BOX membre-->
    </div>
    <!--END col1-->
    <div id="col2">